package com.fx.easyexcel.demo.util;

import com.fx.easyexcel.demo.pojo.Examiner;

import java.util.Date;
import java.util.Random;

/**
 * @author Faxon
 * @version 1.0
 * @date 2020-07-05 16:47
 **/
public class IdUtil {
    public static String getZkzh(Date date,int i){
        String index;
        if(i<10){
            index = "00"+i;
        }else if(i<100){
            index = "0"+i;
        } else{
            index = ""+i;
        }
        if(date == null){
            date = new Date();
        }
        return TimeUtil.formatDate(date,"MMdd")+index;
    }

    /**
     * 获取 2 位 随机数
     *
     * @return
     */
    private String getRandomNumber() {
        Random random = new Random();
        return String.valueOf(random.nextInt(10)) + random.nextInt(10) +random.nextInt(10);
    }
}
